package arrayinarray;

public class ArrayDemo1 {
    public static void main(String[] args) {
        //静态初始化二维数组
        int[][] arr = {{1,2,3},{4,5},{6,7,8,9}};
        System.out.println("arr = " + arr);//

        //二维数组名[索引] : 获取二维数组中指定一维数组的地址值
        System.out.println("arr[0] = " + arr[0]);//[I@74a14482

        System.out.println("arr[0][1] = " + arr[0][1]);//2

        //获取元素个数
        System.out.println("arr.length = " + arr.length);//3

        System.out.println("arr[2].length = " + arr[2].length);//4

        //二维数组名[索引1][索引2] = 要修改的值;
        arr[0][1] = 10;
        System.out.println("arr[0][1] = " + arr[0][1]);//10
    }
}
